<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!--JSTL core tag need to add jstl 1.2 jar to lib-->
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head><title>Struts 1 Training Materials</title>
</head>

<body>
<c:set var="root" value="${pageContext.request.contextPath}"/>
<div align="center">
    <center>
        <table border="1" cellspacing="1" width="400">
            <tr>
                <td width="390"><font size="4"><b>Struts 1 Intro</b></font></td>
            </tr>
            <tr>
                <td width="384">
                    <ul>
                        <li>
                             <a href="#">What is Struts ???</a>
                            <br>
                            - Struts Frame work is the implementation of Model-View-Controller (MVC) design pattern for
                            the JSP.
                            <br>
                            - Struts is maintained as a part of Apache Jakarta project and is open source.
                            (http://jakarta.apache.org/)
                            <br>
                            - We are using jakarta-struts-1.3.10 (dependency added to pom)
                        </li>

                        <li>
                           <a href="#">What is Model-View-Controller (MVC) Architecture?</a>
                            <br>
                            - Model-View-Controller architecture is all about dividing application components into three
                            different categories Model, View and the Controller. Components of the MVC architecture has
                            unique responsibility and each component is independent of the other component. Changes in
                            one component will have no or less impact on other component. Responsibilities of the
                            components are: -
                            <br>
                            <br>
                            - <b>Model:</b> Model is responsible for providing the data from the database and saving the data
                            into the data store. All the business logic are implemented in the Model. Data entered by
                            the user through View are check in the model before saving into the database. Data access,
                            Data validation and the data saving logic are part of Model. -
                            <br>
                            - <b>View:</b> View represents the user view of the application and is responsible for taking the
                            input from the user, dispatching the request to the controller and then receiving response
                            from the controller and displaying the result to the user. HTML, JSPs, Custom Tag Libraries
                            and Resources files are the part of view component. -
                            <br>
                            - <b>Controller: </b>Controller is intermediary between Model and View. Controller is responsible
                            for receiving the request from client. Once request is received from client it executes the
                            appropriate business logic from the Model and then produce the output to the user using the
                            View component. ActionServlet, Action, ActionForm and struts-config.xml are the part of
                            Controller.
                            <br>
                            <img src="../../images/strutsstructure.gif" border="0">
                        </li>

                        <li>
                            <a href="#">Features of MVC1 / MVC2 </a>
                            <br>
                            <b>MVC1 :</b>
                            <br>
                            -Html or jsp files are used to code the presentation. To retrieve the data JavaBean can be used.
                            <br>
                            -In mvc1 archictecture all the view, control elements are implemented using Servlets or Jsp.
                            <br>
                            -In MVC1 there is tight coupling between page and model as data access is usually done using Custom tag or through java bean call.
                            <br>
                            <br>
                            <b>MVC2:</b>
                            <br>
                            -The MVC2  architecture removes the page centric property of MVC1 architecture by separating Presentation, control logic and the application state.
                            <br>
                            -In MVC2 architecture there is only one controller which receives all the request for the application and is responsible for taking appropriate action in response to each request.
                        </li>
                    </ul>
                </td>
            </tr>
            <tr>
                <td>
                    <a href="${root}/index.jsp">HOME</a>
                </td>
            </tr>
        </table>
    </center>
</div>
</body>
</html>